<script setup lang="ts">
import { IPackAntvX6 } from '../inter';
// import { IPackAntvX6 } from '../inter';

const props = defineProps<IPackAntvX6.ContextmenuProps>();
const { visible,posStyle,vnode,close } = props;

const handleClose = () => {
    close();
}
</script>

<template>
    <div v-show="visible" :class="['_contextmenu',`${visible ? 'swing-in-top-fwd' : 'swing-out-top-bck'}`, 'z-100 absolute p-2 rd-2']"
        :style="posStyle" 
        @contextmenu.stop.prevent="() => false"
        @click.stop="handleClose"        
        >
        <component v-if="vnode" :is="vnode"></component>
    </div>
</template>
